package com.xiaohong.user.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serializable;
import java.util.Date;

import static io.swagger.v3.oas.annotations.media.Schema.AccessMode.READ_ONLY;

@Schema(name = "Friend")
public class Friend implements Serializable{

	@TableId(value = "id",type = IdType.ASSIGN_ID)
	@Schema(description = "主键ID",accessMode = READ_ONLY,required = true)
	@JsonFormat(shape = JsonFormat.Shape.STRING)
	private Long id;//主键ID

	@Schema(description = "用户id",required = true)
	@TableField("userId")
	private Long userId;//用户id

	@Schema(description = "好友id",required = true)
	@TableField("friendId")
	private Long friendId;//好友id

	@Schema(description = "好友分组英文名",required = true)
	@TableField("groupNameEN")
	private String groupNameEN;//好友分组英文名

	@Schema(description = "好友分组中文名",required = true)
	@TableField("groupNameCH")
	private String groupNameCH;//好友分组中文名

	@Schema(description = "创建时间",accessMode = READ_ONLY)
	@TableField(value = "gmt_create",fill = FieldFill.INSERT)
	private Date gmtCreate;//创建时间

	@Schema(description = "更改时间",accessMode = READ_ONLY)
	@TableField(value = "gmt_modified",fill = FieldFill.INSERT_UPDATE)
	private Date gmtModified;//更改时间

	@Schema(description = "乐观锁",accessMode = READ_ONLY)
	@Version
	private Integer version;//乐观锁

	@Schema(description = "逻辑删除标志",accessMode = READ_ONLY)
	@TableLogic
	private Integer deleted;//逻辑删除标志


	//get方法
	public Long getId() {
		return id;
	}

	//set方法
	public void setId(Long id) {
		this.id = id;
	}
	//get方法
	public Long getUserId() {
		return userId;
	}

	//set方法
	public void setUserId(Long userId) {
		this.userId = userId;
	}
	//get方法
	public Long getFriendId() {
		return friendId;
	}

	//set方法
	public void setFriendId(Long friendId) {
		this.friendId = friendId;
	}
	//get方法
	public String getGroupNameEN() {
		return groupNameEN;
	}

	//set方法
	public void setGroupNameEN(String groupNameEN) {
		this.groupNameEN = groupNameEN;
	}
	//get方法
	public String getGroupNameCH() {
		return groupNameCH;
	}

	//set方法
	public void setGroupNameCH(String groupNameCH) {
		this.groupNameCH = groupNameCH;
	}
	//get方法
	public Date getGmtCreate() {
		return gmtCreate;
	}

	//set方法
	public void setGmtCreate(Date gmtCreate) {
		this.gmtCreate = gmtCreate;
	}
	//get方法
	public Date getGmtModified() {
		return gmtModified;
	}

	//set方法
	public void setGmtModified(Date gmtModified) {
		this.gmtModified = gmtModified;
	}
	//get方法
	public Integer getVersion() {
		return version;
	}

	//set方法
	public void setVersion(Integer version) {
		this.version = version;
	}
	//get方法
	public Integer getDeleted() {
		return deleted;
	}

	//set方法
	public void setDeleted(Integer deleted) {
		this.deleted = deleted;
	}


}
